package com.tpu.bdclasses;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
 * @hibernate.class table="order"  
 */
public class TheatreOrder {
	private Date timeofpay;
	private Date timeofcreation;
	private int status;
	private String adress;
	private TheaterUser theuser;
	private Deliver deliver;
	private Distanse distanse;
	private int order_id;
	private Set tickets=new HashSet();
	
	public TheatreOrder(Date timeofpay, Date timeofcreation, int status,
			String adress, TheaterUser theuser, Deliver deliver,
			Distanse distanse, int id) {
		super();
		this.timeofpay = timeofpay;
		this.timeofcreation = timeofcreation;
		this.status = status;
		this.adress = adress;
		this.theuser = theuser;
		this.deliver = deliver;
		this.distanse = distanse;
		this.order_id = id;
	}
	public TheatreOrder(){}
	/**
	 * @hibernate.id generator-class="native" column="id"
	 */
	public int getOrder_id() {
		return order_id;
	}

	public void setOrder_id(int order_id) {
		this.order_id = order_id;
	}
	
	/**
	* @hibernate.many-to-one
	* column="id"
	*/
	public Distanse getDistanse() {
		return distanse;
	}

	public void setDistanse(Distanse distanse) {
		this.distanse = distanse;
		
	}
	/**
	* @hibernate.many-to-one
	* column="id"
	*/
	public Deliver getDeliver() {
		return deliver;
	}

	public void setDeliver(Deliver deliver) {
		this.deliver = deliver;
	}

	
	/**
	* @hibernate.many-to-one
	* column="id"
	*/
	
	public TheaterUser getTheuser() {
		return theuser;
	}

	public void setTheuser(TheaterUser theuser) {
		this.theuser = theuser;
	}

	
	/**
     * @hibernate.property column="tofpay"
     */
	public Date getTimeofpay() {
		return timeofpay;
	}

	public void setTimeofpay(Date timeofpay) {
		this.timeofpay = timeofpay;
	}
	/**
     * @hibernate.property column="tofcreation"
     */
	public Date getTimeofcreation() {
		return timeofcreation;
	}

	public void setTimeofcreation(Date timeofcreation) {
		this.timeofcreation = timeofcreation;
	}
	/**
     * @hibernate.property column="status"
     */
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}
	/**
     * @hibernate.property column="adress"
     */
	public String getAdress() {
		return adress;
	}

	public void setAdress(String adress) {
		this.adress = adress;
	}
	/**
	* @hibernate.set
	* inverse="true"
	* order-by="id"
	* @hibernate.collection-key
	* column="id"
	* @hibernate.collection-one-to-many
	*/
	public Set getTickets() {
		return tickets;
	}
	public void setTickets(Set tickets) {
		this.tickets = tickets;
	}
	public void addTicket(Ticket ticket) {
		this.tickets.add(ticket);
	}

}
